<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');

    $router->get('/dashboard', 'DashboardController@index')->name('dashboard');
	$router->resource('inspections', InspectionsController::class);

	$router->resource('broadcasts', BroadcastsController::class);

	$router->post('api/editors/upload', 'Api\EditorsController@upload');
	$router->get('api/products', 'Api\ProductsController@index');
	$router->get('api/users', 'Api\UsersController@index');
	$router->get('api/user/increase', 'Api\CountsController@userIncrease');
	$router->get('api/user/consist', 'Api\CountsController@userConsist');
	$router->get('api/everyday/profit', 'Api\CountsController@everydayProfit');
	$router->get('api/provinces', 'Api\AreasController@province');
	$router->get('api/areas', 'Api\AreasController@area');

	$router->resource('configs', ConfigsController::class);
	$router->resource('config-withdraws', ConfigWithdrawsController::class);
	$router->resource('config-apps', ConfigAppsController::class);
	$router->resource('config-sales', ConfigSalesController::class);
	$router->resource('config-storms', ConfigStormsController::class);

	$router->resource('super-users', SuperUsersController::class);
	$router->resource('users', UsersController::class);
	$router->resource('grades', GradesController::class);
	$router->get('users/batch/sms/form', 'UsersController@smsForm')->name('users.batch.sms.form');
	$router->post('users/batch/sms/store', 'UsersController@smsStore')->name('users.batch.sms.store');

	$router->resource('addresses', AddressesController::class);

	$router->resource('upgrade-logs', UpgradeLogsController::class);

	$router->resource('posters', PostersController::class);
	$router->resource('invite-posters', InvitePostersController::class);


	$router->get('withdraws/postback', 'WithdrawsController@postback')->name('withdraws.postback');
	$router->resource('withdraws', WithdrawsController::class);
	$router->get('withdraws/export/pending', 'WithdrawsController@export')->name('withdraws.export');
	$router->get('withdraws/export/user', 'WithdrawsController@user')->name('withdraws.user');
	$router->post('withdraws/import', 'WithdrawsController@import')->name('withdraws.import');


	$router->resource('slides', SlidesController::class);
	$router->resource('categories', CategoriesController::class);

	$router->resource('attribute-groups', AttributeGroupsController::class);
	$router->resource('attribute-keys', AttributeKeysController::class);
	$router->resource('attribute-values', AttributeValuesController::class);

	$router->resource('brands', BrandsController::class);

	$router->resource('products', ProductsController::class);
	$router->resource('product-skus', ProductSkusController::class);
	$router->resource('product-slides', ProductSlidesController::class);
	$router->resource('product-images', ProductImagesController::class);

	$router->resource('hot-products', HotProductsController::class);

	$router->resource('vendors', VendorsController::class);
	$router->resource('vendor-orders', VendorOrdersController::class);
	$router->post('vendor-orders/{order}/deliver', 'VendorOrdersController@deliver')->name('vendor.orders.deliver');
	$router->post('vendor-orders/import', 'VendorOrdersController@import')->name('vendor.orders.import');
	$router->resource('vendor-admins', VendorAdminsController::class);

	$router->resource('orders', OrdersController::class);
	$router->post('orders/{order}/deliver', 'OrdersController@deliver')->name('orders.deliver');
	$router->get('orders/undelivered/export/normal', 'OrdersController@exportNormal')->name('orders.export.normal');
	$router->get('orders/undelivered/export/group', 'OrdersController@exportGroup')->name('orders.export.group');
	$router->get('orders/undelivered/exports', 'OrdersController@exports')->name('orders.exports');
	$router->get('orders/undelivered/deliveries', 'OrdersController@deliveries')->name('orders.deliveries');
	$router->post('orders/deliveries/import', 'OrdersController@import')->name('orders.deliveries.import');
	$router->resource('order-refunds', OrderRefundsController::class);

	$router->resource('comments', CommentsController::class);

	$router->resource('gold-rounds', GoldRoundsController::class);

    $router->resource('gold-seeds', GoldSeedsController::class);
	$router->get('gold-seeds/batch/gold/products', 'GoldSeedsController@batchGoldProductsFrom')->name('gold.seeds.batch.products');
	$router->post('gold-seeds/batch/gold/products', 'GoldSeedsController@storeBatchGoldProducts')->name('gold.seeds.store.batch.products');

	$router->resource('gold-products', GoldProductsController::class);
	$router->resource('gold-charges', GoldChargesController::class);
	$router->resource('gold-beans', GoldBeansController::class);
	$router->resource('gold-coins', GoldCoinsController::class);
    $router->resource('gold-cashes', GoldCashesController::class);
    $router->resource('gold-subsidies', GoldSubsidiesController::class);
	$router->resource('gold-records', GoldRecordsController::class);
    $router->resource('gold-wastes', GoldWastesController::class);
    $router->resource('gold-splits', GoldSplitsController::class);
    $router->resource('gold-ends', GoldEndsController::class);
	$router->resource('gold-children', GoldChildrenController::class);
	$router->resource('gold-statistics', GoldStatisticsController::class);
	$router->resource('gold-news', GoldNewsController::class);
	$router->resource('gold-prize', GoldPrizesController::class);
	$router->resource('white', WhiteController::class);
	$router->resource('detect', DetectController::class);
	$router->resource('myuser', MyUserController::class);
	$router->resource('hipster-apple-trees', HipsterAppleTreesController::class);
	$router->resource('hipster-apples', HipsterApplesController::class);
	$router->resource('hipster-apple-trees-records', HipsterAppleTreesRecordsController::class);
	$router->resource('hipster-statistics', HipsterStatisticsController::class);
	$router->resource('product-links', PorductLinksController::class);
	$router->resource('test-topics', TestTopicsController::class);
	$router->resource('test-questions', TestQuestionsController::class);
	$router->resource('vip-purchases', VipPurchasesController::class);
	$router->resource('seckill-products', SeckillProductsController::class);

	$router->resource('collections', CollectionsController::class);
	$router->resource('collection-images', CollectionImagesController::class);
	$router->resource('materials', MaterialsController::class);
	$router->resource('material-images', MaterialImagesController::class);
	$router->get('collections/batch/combination/form', 'CollectionsController@combinationForm')->name('collections.batch.combination.form');
	$router->resource('gc-groups', GcGroupsController::class); 
	$router->resource('gc-categories', GcCategoriesController::class); 
	$router->resource('gc-user-images', GcUserImagesController::class); 
	$router->resource('gc-texts', GcTextsController::class); 
	$router->resource('gc-fans', GcFansController::class); 
	$router->resource('gc-sensitive', GcSensitivesController::class); 

});
